<ion-view view-title="图文详情" class="productinfo has-header">
	<!--一定要手动加导航栏-->
	<ion-nav-bar>
		<ion-nav-back-button>
		</ion-nav-back-button>
	</ion-nav-bar>
	<div class="bar bar-subheader padding-0" ng-if="isShowSubheader">
		<div class="row top">
			<div class="col" on-tap="activeTab(0)">
				<div ng-class="selectTab==0?'top-activated':''">图片详情</div>
			</div>
			<div class="col" on-tap="activeTab(1)" ng-if="show_discuss=='true'">
				<div ng-class="selectTab==1?'top-activated':''">商品评价</div>
			</div>
			<div class="col" on-tap="activeTab(2)" ng-if="show_consult=='true'">
				<div ng-class="selectTab==2?'top-activated':''">商品问答</div>
			</div>
			<div class="col" on-tap="activeTab(3)" ng-if="show_selllog=='true'">
				<div ng-class="selectTab==3?'top-activated':''">销售记录</div>
			</div>
		</div>
	</div>
	

	<!--描述：滑动块-->
	<ion-content class="scroll-content" ng-class="{'has-subheader':isShowSubheader}">

		<ion-slide-box delegate-handle="tab-handle" on-touch="onTouch()" on-release="onRelease()" draw-slide="false" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">

			<!--描述：第一个模块--图文详情-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj">
					<div class="list">
						<div class="tuwen" ng-bind-html="description"></div>
					</div>
				</ion-scroll>
			</ion-slide>


			<!--描述：第2个模块--商品评价-->
			<ion-slide ng-hide="isTransfer=='true'" class="comment bg">
				<ion-scroll direction="y" ng-style="myObj">
				<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div class="list">
						<li class="item totalItem">商品评分：<span class="point">{{avg_num}}</span></li>
						<li class="item typeItem">
							<div class="typeBtn" ng-class="{'active':!filter}" on-tap="init_comments('')">全部</div>
							<div class="typeBtn" ng-class="{'active':filter=='hasappend'}" on-tap="init_comments('hasappend')">追加</div>
							<div class="typeBtn" ng-class="{'active':filter=='hasimage'}" on-tap="init_comments('hasimage')">图片</div>
						</li>
						<!--没有数据-->
						<li class="item bg item-borderless noData" ng-if="firstHide[0]&&!comments.discuss_info">
							<img src="./img/guilin/other/icon_noComment@2x.png" />
							<div class="tip">暂时没有评价哦！</div>
						</li>
						
						<!--<div ng-repeat="i in [1,2,3,4,5]">-->
						<li class="item item-input userItem" ng-repeat-start="com in comments.discuss_info">
							<img src="{{com.logo?com.logo:'./img/guilin/other/default_logo.png'}}" />{{com.author}}
						</li>
						<li class="item specItem item-text-wrap">
							{{com.spec_info}}
						</li>
						<!--初评-->
						<li class="item comItem item-text-wrap">
							<span class="firstCom">初评</span>
							<span class="time">{{com.time}}</span>
							<div class="com">{{com.comment}}</div>
							<div class="imgDiv" ng-if="com.images">
								<div class="row">
									<div class="col" ng-repeat="img in com.images" on-tap="showBigImg(img)">
										<img src="{{img}}" />
									</div>
								</div>
							</div>
							<div class="showReply" on-tap="showBuyerReply($index,'')" ng-if="com.answer">
								查看回复<img src="{{com.isShowReply?'./img/guilin/common/icon_up@2x.png':'./img/guilin/common/icon_down@2x.png'}}" />
							</div>
							<div class="buyerReply" ng-repeat="answer in com.answer" ng-class="{'mt10':!$first}" ng-if="com.isShowReply">
								<div class="replyTime">
									<span class="tip">店家回复</span>
									{{answer.time}}
								</div>
								{{answer.comment}}
							</div>
						</li>
						
						<!--追评-->
						<li class="item comItem item-text-wrap" ng-repeat="add in com.addition">
							<span class="firstCom">追评</span>
							<span class="time">{{add.time}}</span>
							<div class="com">{{add.comment}}</div>
							<div class="imgDiv" ng-if="add.images">
								<div class="row">
									<div class="col" ng-repeat="img in add.images" on-tap="showBigImg(img)">
										<img src="{{img}}" />
									</div>
								</div>
							</div>
							<!-- 如果用ng-if="add.answer"会导致$parent.$index获取不到正确的值-->
							<div class="showReply" on-tap="showBuyerReply($parent.$index,'add')" ng-show="add.answer">
								查看回复<img src="{{com.isShowReplyAdd?'./img/guilin/common/icon_up@2x.png':'./img/guilin/common/icon_down@2x.png'}}" />
							</div>
							<div class="buyerReply" ng-repeat="an in add.answer" ng-class="{'mt10':!$first}" ng-if="com.isShowReplyAdd">
								<div class="replyTime">
									<span class="tip">店家回复</span>
									{{an.time}}
								</div>
								{{an.comment}}
							</div>
						</li>
						<li class="item emptyItem" ng-repeat-end></li>
						<!--</div>-->
					</div>
				
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad&&comments.page.tPage>nPage_comment" immediate-check="false" on-infinite="doRefreshMore()" distance="0.5%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>
			
			
			<!--商品问答-->
			<ion-slide class="consults bg">
				<ion-scroll direction="y" ng-style="myObj" delegate-handle="consults-handle">
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					
					<!--没有数据-->
					<div class="noData" ng-if="firstHide[1]&&!consultList.consults">
						<img src="./img/guilin/other/icon_noAnswer@2x.png" />
						<div class="tip">好不好，问商家！</div>
					</div>
					
						<div class="list" ng-if="consultList.consults">
							<!--问-->
							<li class="item item-text-wrap" ng-repeat-start="con in consultList.consults">
								<div class="row">
									<div class="wenCol">
										<div class="textType wen">问</div>
									</div>
									<div class="col questionCol">
										{{con.question}}
									</div>
								</div>
								<div class="author">
									{{con.author}}
									<span class="time">{{con.time}}</span>
								</div>
							</li>
							<!--答-->
							<li class="item item-text-wrap" ng-repeat="rep in con.replay">
								<div class="row">
									<div class="wenCol">
										<div class="textType da">答</div>
									</div>
									<div class="col questionCol da">
										{{rep.replay}}
									</div>
								</div>
								<div class="author">
									{{rep.time}}
								</div>
							</li>
							<li class="item emptyItem" ng-repeat-end ng-if="!$last"></li>
							<li class="item endItem bg">已经到底了</li>
						</div>
						<div style="height: 60px;" ng-if="consultList.setting.ask=='onlymember'&&isLogin"></div>
					<ion-infinite-scroll ng-if="!isLoad&&consultList.page.tPage>nPage_consults" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
				<!--提问区-->
				<div class="bar bar-footer bg" ng-if="consultList.setting.ask=='all'||isLogin">
					<div class="tiwen">
						<div class="item-input padding-0">
							<input type="text" placeholder="向商家提问吧！4-100字" ng-model="input.comment"/>
							<div class="submit" on-tap="submitAsk()">确定</div>
						</div>
						<div class="niming" ng-if="isLogin">
							<img src="{{isHiddenName?'./img/guilin/common/icon_check_o@2x.png':'./img/guilin/common/icon_uncheck_o@2x.png'}}" on-tap="hidden_name()"/>匿名发表
						</div>
					</div>
				</div>
			</ion-slide>
			
			
			<!--销售记录-->
			<ion-slide class="log">
				<ion-scroll direction="y" ng-style="myObj">
				<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					
					<!--没有数据-->
					<div class="noData" ng-if="firstHide[2]&&!sellList.selllog">
						<img src="./img/guilin/other/icon_noRecord@2x.png" />
						<div class="tip">暂时没有销售记录哦！</div>
					</div>
					<div class="list" ng-if="sellList.selllog">
						<li class="item">
							<div class="row title">
								<div class="col col-33">买家</div>
								<div class="col col-15">数量</div>
								<div class="col col-40">成交时间</div>
								<div class="col">状态</div>
							</div>
						</li>
						<li class="item" ng-repeat="log in sellList.selllog">
							<div class="row comment">
								<div class="col col-33">{{log.alias}}</div>
								<div class="col col-15">{{log.number}}</div>
								<div class="col col-40">{{log.createtime}}</div>
								<div class="col">成交</div>
							</div>
						</li>
					</div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad&&sellList.page.tPage>nPage_log" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>
			
		</ion-slide-box>
	</ion-content>
</ion-view>